package com.woniu.controller;

import com.woniu.entity.Result;
import com.woniu.pojo.Trainer;
import com.woniu.service.ITrainerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 培训师 前端控制器
 * </p>
 *
 * @author xiaoyu
 * @since 2023-03-07
 */
@RestController
@RequestMapping("/trainer")
@Api(tags = "培训师管理")
public class TrainerController extends BaseController {
    @Autowired
    private ITrainerService iTrainerService;
    @GetMapping
    @ApiOperation("查询所有")
    public Result findAll(){
        List<Trainer> list = iTrainerService.list();
        return toDataResult(list);
    }

}
